<template>
  <!-- 用戶概況 -->
  <div class="query">
    <el-input v-model="input3" clearable placeholder="请输入关键字进行搜索" class="queryinput">
      <template #prepend>
        <el-select v-model="select" placeholder="选择信息" clearable style="width: 100px">
          <el-option label="地区" value="1" style="color:black" />
          <el-option label="学校" value="2" style="color:black" />
        </el-select>
      </template>
      <template #append>
        <el-button style="background-color: #1890ff; color: #fff;">查询</el-button>
      </template>
    </el-input>
  </div>
  <el-table :data="tableData.list" border stripe style="font-size: 12px;" :cell-style="{ 'text-align': 'center' }">
    <el-table-column type="index" label="序号" width="50" header-align="center" />
    <el-table-column prop="Region" label="地区" header-align="center" />
    <el-table-column prop="school" label="学校名称" header-align="center" />
    <el-table-column prop="typeSchool" label="学校类型" header-align="center" />
    <el-table-column prop="teacherNum" label="老师人数" header-align="center" />
    <el-table-column prop="studentNum" label="学生人数" header-align="center" />
    <el-table-column prop="parentsNum" label="家长人数" header-align="center" />
  </el-table>
</template>

<script setup>
import { onMounted, ref } from "vue"
import { userPro_file } from "../../../utils/api";


// 信息选择框
const input3 = ref('')
const select = ref('')

var tableData = ref({
  list: []
})

onMounted(() => {
  userPro_file().then((res) => {
    // console.log(res.data.userProfile);
    tableData.value.list = res.data.userProfile
  })
})
</script>

<style lang="scss" scoped>
.inquire {
  height: auto;

  input {
    width: 150px;
    border-radius: 3px;
    line-height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.247058823529412);
    outline: none;
    font-size: 12px;
    padding: 3px;
    margin-bottom: 10px;
  }

  input:nth-child(2) {
    margin-left: 20px;
  }

  ::-webkit-input-placeholder {
    color: rgb(217, 217, 217);
  }

  button {
    background-color: #1890ff;
    width: 60px;
    height: 28px;
    color: #fff;
    border: none;
    border-radius: 3px;
    margin-left: 20px;
    font-size: 12px;
  }
}
.query {
  margin-bottom: 10px;
    .queryinput {
      font-size: 12px;
      width: 350px;
    }
  }
  .local{
    position: absolute;
    left: 130px;
  }
</style>